package com.flyxiaozhu.erp.core.entities;

import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

@Entity
@Data
@DynamicInsert
@DynamicUpdate
@Table(indexes = {
        @Index(columnList = "key")
})
public class App extends BaseEntity {
    @Column(columnDefinition = "varchar(32) not null default '' comment '应用名称'")
    private String name;

    @Column(name = "`desc`", columnDefinition = "varchar(255) not null default '' comment '应用描述'")
    private String desc;

    @Column(name = "`key`", columnDefinition = "varchar(32) not null default '' comment '应用key'")
    private String key;

    @Column(columnDefinition = "varchar(32) not null default '' comment '应用secret'")
    private String secret;

    @Column(columnDefinition = "tinyint(11) not null default 0 comment '状态'")
    private int status;

    @Column(columnDefinition = "varchar(255) not null default '' comment '缩略图'")
    private String thumb;
}
